<template>
  <!--计划基本信息组件 -->
  <div>
    <h4 class="title-layer-bar flex v-align-c">
      <div class="line"></div>
      <div>计划设置</div>
    </h4>
    <div class="mar-t-20"></div>
    <el-form :model="planForm" label-width="130px" ref="planForm">
      <el-form-item label="计划名称：" label-width="170px">
        {{planForm.planName}}
      </el-form-item>
    </el-form>
  </div>
</template>


<script>
  import elDragDialog from '@/directive/el-dragDialog' // base on element-ui
  export default {
    components: {},
    directives: {
      elDragDialog
    },
    data() {
      return {
        planForm: {
          planId: '',
          planName: ''
        }
      }
    },
    // 初始化页面
    created() {
      // 绑定响应计划信息查询回来的信息
      this.bindPlanInfo()
    },
    methods: {
      bindPlanInfo() {
        const that = this
        this.$bus.$on('plan.data', function(data) {
          that.planForm.planId = that.$utils.isExist(data.planId) ? data.planId : ''
          that.planForm.planName = that.$utils.isExist(data.planName) ? data.planName : ''
        })
      }
    }
  }
</script>

<style lang="less" scoped>
  .pro-p-minheight {
    min-height: 148px;
  }

  .noraml-hide {
    display: none !important;
  }

  .active {
    display: block !important;
  }

  .span-bar {
    padding: 0 50px;
  }

  .remove-btn {
    padding: 7px 6px !important;
  }

  .long-input {
    width: 80%;
  }

  .long-input-2 {
    min-width: 55%;
    // margin-right: 10px;
  }

  .long-input-3 {
    width: 55%;
  }

  .short-input {
    width: 20%;
  }

  .short-input-2 {
    width: 25%;
  }

  .default-input {
    width: 50%;
  }

  .tips {
    color: gray;
    font-size: 12px;
    line-height: 1.2;
    padding-top: 5px;
  }

  .picture {
    width: 148px;
    height: 148px;
    display: block;
  }

  .pic-bar {
    position: relative;
    display: inline-block;

    .close-icon {
      position: absolute;
      right: -30px;
      top: -11px;
      width: 31px;
      height: 40px;
      padding: 0 7px;
      cursor: pointer;
    }

    span {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 100%;
      display: block;
      color: #fff;
      text-align: center;
      padding: 3px 0;
      background: rgba(0, 0, 0, 0.5);
      cursor: pointer;
    }
  }

  .pic-add {
    background: #fff;
    border: #d3d3d3 1px dashed;
    border-radius: 5px;
    padding: 0 45px;
  }

  .el-dialog-div {
    height: 70vh;
    overflow: auto;
  }
</style>
